/*
 * @Author: LIFM0623 1944099171@qq.com
 * @Date: 2024-02-24 16:41:17
 * @LastEditors: LIFM0623 1944099171@qq.com
 * @LastEditTime: 2024-03-07 16:40:41
 * @FilePath: \scene_back_nest\src\usertogroup\entities\usertogroup.entity.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Entity, Column, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';

@Entity()
export class usertogroup{
    @PrimaryGeneratedColumn('uuid')
    id: string;

    @Column()
    useruuid: string;

    @Column()
    groupnickname:string;

    @Column()
    groupuuid: string;

    @Column('enum', { enum: ['creator', 'collaborator','manager', 'member'], default: 'member' })
    role: string;

    @Column({
        name: 'create_time',
        type: 'timestamp without time zone',
        default: () => 'CURRENT_TIMESTAMP',
    })
    create_time: Date;

    @UpdateDateColumn({ 
        name: 'update_time',
        type:'timestamp',
        default:() => 'CURRENT_TIMESTAMP' 
    })
    update_time: Date;
}